package com.xingkeduo.model.bo;

/**
 * @Author: 中文输入法发挥不稳定的刘川
 * @Date: 19-3-20 下午8:46
 */
public enum  StockStatusEnum {

    //TODO 找产品确定库存状态
    FREE((byte)0,"空闲"),
    WAIT_FOR_PAYMENT((byte)1,"待付款"),
    WAIT_FOR_SERVICE((byte)2,"待服务"),
    IN_SERVICE((byte)3,"服务中"),
    ALREADY((byte)4,"服务完成"),
    OVERDUE((byte)5,"过号"),
    SYSTEM_OCCUPY((byte)6,"系统占用"),
    MANUAL_REST((byte)7,"手动休息"),
    REFUND((byte)8,"退款");

    private byte value;
    private String description;

    StockStatusEnum(byte value,String description){
        this.value=value;
        this.description=description;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static StockStatusEnum getAttendanceType(int value) {
        StockStatusEnum[] stockStatusEnums = values();
        for (int i = 0; i < stockStatusEnums.length; ++i) {
            if (stockStatusEnums[i].getValue() == value) {
                return stockStatusEnums[i];
            }
        }
        return null;
    }
    public byte getValue() {
        return this.value;
    }

}
